package com.guigu.hkw.Service;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    //当前用户具有 a 角色可以被访问
    @RequiresRoles(value = {"a"})
    public void text1(){
        System.out.println("text1进来了");
    }
    //当前用户具有 b 角色可以被访问
    @RequiresRoles(value = {"b"})
    public void text2() {
        System.out.println("text2进来了");
    }
    //操作权限
    @RequiresPermissions("user:del")
    public void text3() {
        System.out.println("删除");
    }
    @RequiresPermissions("user:find")
    public void text4() {
        System.out.println("用户查询");
    }
}
